package com.qfjy.controller;

import com.qfjy.service.VideoInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName VideoInfoController
 * @Description TODO
 * @Author guoweixin
 * @Date 2022/12/13
 * @Version 1.0
 */
@Controller
@Slf4j
@RequestMapping("videoInfo")
public class VideoInfoController {

    @Value("${server.port}")
    private String port;

    @Autowired
    private VideoInfoService videoInfoService;

    /**
     * 根据会议编号查询视频详情
     * @param pcode
     * @return
     * url: videoInfo/select?pcode=..
     */
    @GetMapping("select")
    @ResponseBody
    public String selectVideoInfoByPcode(@RequestParam("pcode") String pcode){
        return videoInfoService.selectVideoInfoByPcode(pcode)+"\t"+port;
    }


    @PostMapping("select1")
    @ResponseBody
    public String selectVideoInfoByPcode1(@RequestParam("pcode") String pcode){
        return "测试select1";
    }
}
